import Vue from 'vue'
import App from './App'
import store from './store/store'
import router from "./router";
import {userToken} from "./store/mutations";
import VueCookies from 'vue-cookies';
import qs from "qs";
import axios from "axios";
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import VueCodemirror from 'vue-codemirror'

Vue.use(VueCodemirror, /* {
  options: { theme: 'base16-dark', ... },
  events: ['scroll', ...]
} */)

axios.defaults.withCredentials=true;

Vue.use(VueCookies)
Vue.use(ElementUI);



axios.defaults.timeout=5000;
axios.defaults.withCredentials=true;


// 30天后过期
window.$cookies.config('30d')
// window object
window.$cookies.config('30d')
window.$cookies.HttpOnly = true;
// require lib


// require styles
import 'codemirror/lib/codemirror.css'

// require more codemirror resource...

// you can set default global options and events when use


new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})

